<template>
  <div class="scm-wrap">
    <SCMHeader/>
    <SCMMenuTag/>
    <div class="scm-body">
      <el-main>
        <!-- 使用单页组件缓存 start -->
        <transition name="fade" mode="out-in">
          <keep-alive>
            <router-view v-if="$route.meta.keepAlive"></router-view>
          </keep-alive>
        </transition>
        <!-- 使用单页组件缓存 end -->
        <transition name="fade">
          <router-view v-if="!$route.meta.keepAlive"></router-view>
        </transition>
      </el-main>
    </div>
  </div>
</template>

<script>
import SCMHeader from './header'
import SCMMenuTag from './menuTag'
export default{
  data(){
    return {

    }
  },
  mounted(){

  },
  components:{
    SCMHeader,
    SCMMenuTag
  },
  methods:{

  }
}
</script>
<style>
.fade-enter-active, .fade-leave-active {
  transition: opacity .5s;
}
.fade-enter, .fade-leave-to{
  opacity: 0;
}
</style>